package net.towee.client.event.core;

import net.towee.model.account.AccountIdentity;

import com.google.gwt.event.shared.GwtEvent;

public class UserRemovedFromContactsEvent extends GwtEvent<UserRemovedFromContactsHandler> {
	public static Type<UserRemovedFromContactsHandler> TYPE = new Type<UserRemovedFromContactsHandler>();
	
	private final AccountIdentity identity;
	private final String groupName;

	public UserRemovedFromContactsEvent(AccountIdentity first, String second) {
		this.identity = first;
		this.groupName = second;
	}

	@Override
	public Type<UserRemovedFromContactsHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(UserRemovedFromContactsHandler handler) {
		handler.onUserRemoved(identity, groupName);
	}

}
